(* Mathematica package *)

SetAttributes[RefractionMv, {Listable}];

RefractionMv["s", thetai_, thetaj_, ni_, nj_] := 
	Block[{intss = ts[thetai, thetaj, ni, nj]^(-1),
		   rss = rs[thetai, thetaj, ni, nj]},
		intss * {{1,rss},{rss,1}}];
    
RefractionMv["p", thetai_, thetaj_, ni_, nj_] := 
	Block[{intpp = tp[thetai, thetaj, ni, nj]^(-1), 
		   rpp = rp[thetai, thetaj, ni, nj]},
		intpp * {{1, rpp},{rpp, 1}}];

RefractionMv[___]/;Message[General::badargs,RefractionMv] := 
	"dummy result, so symbol returned unevaluated";
